package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.RuleList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenm
 * @create 2019-07-23 14:25
 */
public interface RuleListMapper{

    /**
     * 删除
     * @param ids
     * @param dataState
     * @return
     */
    int delRuleList(@Param("ids") Integer[] ids, @Param("dataState") Integer dataState);

    /**
     * 根据id查詢
     * @param ruleListId
     * @return
     */
    public List<RuleList> getRuleList(@Param("ruleListId") Integer ruleListId);

    /**
     * 查询全部集合
     * @param ruleList
     * @return
     */
    public List<RuleList> listRules(RuleList ruleList);

    /**
     * 分页总数
     * @param ruleList
     * @return
     */
    int countRuleList(RuleList ruleList);

    // 接连删除
    int delRuleListById(RuleList ruleList);

    // 序号查重
    RuleList getRuleListAutoid(@Param("ruleDetailId") Integer ruleDetailId, @Param("autoid") String autoid);

    int listRuleListByRuleId(@Param("ruleIds") Integer[] ruleIds);


    int insertSelective(RuleList ruleList);


    int updateByPrimaryKeySelective(RuleList ruleList);
}
